package lab01;

/**
 * Created by Jammy on 2017/10/10.
 */
public class Test05 {
    public static void main(String[] args) {
        int i = 1, sum = 0, n = 100;
for(;i<=n;i++)
    sum=sum+i;
    System.out.println(sum);


       while (i <= n) {
            sum=sum+i;
            i++;
        }
        System.out.println(sum);


       /* do {
            sum = sum + i;
            i++;
        }
        while (i <= n);

        System.out.println(sum);*/
    }
}
